package com.example.factory.core.repository;

import com.example.factory.core.domain.RoleEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * @author Lei Tao
 */
public interface RoleEntityRepository extends CrudRepository<RoleEntity, Long> {
    @Query("select r from RoleEntity r where r.archived=false ")
    List<RoleEntity> selectAll();

    RoleEntity findByGuidAndArchivedFalse(String roleGuid);
}
